package N2024.M11.D30;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25228
 * Date: 2025-02-28
 * Time: 21:24
 */
public class test4 {
    public static void main(String[] args) {
        int[] array={0,1,3,5,0,6,0};
        int s=array.length;
        int dest=-1;
        for (int i = 0; i < s; i++) {
            if (array[i]!=0){
                dest++;
                int tmp=array[dest];
                array[dest]=array[i];
                array[i]=tmp;
            }
        }
        System.out.println(Arrays.toString(array));
    }
}
